package com.zrh.jsd.service.studydemo.enum_test;

import lombok.Getter;
import org.junit.jupiter.api.Test;

@Getter
public enum State {
    UNKOWN(0),
    HELLO(1);
    private Integer state;

    State(Integer state) {
        this.state = state;
    }

    @Test
    public static String getName(Integer state){
        System.out.println("getName");
       for (State state1 :values()){
            if(state.equals(state1.getState())){
                String a = state1.name();
                System.out.println("---"+a);
            }
       }
       return null;
    }
}

